﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPSolutions.Samples.PickerApp
{
    /// <summary>
    /// Represents a city manager
    /// </summary>
	public class CityManager
	{
        // Static fields
        private static CityCollection s_allCities;

        /// <summary>
        /// Static constructor
        /// </summary>
        static CityManager()
        {
            // Create a new city collection
            s_allCities = new CityCollection();

            // Add each city
            s_allCities.Add(new City("Chicago", "IL"));
            s_allCities.Add(new City("Houston", "TX"));
            s_allCities.Add(new City("Los Angeles", "CA"));
            s_allCities.Add(new City("Nashville", "TN"));
            s_allCities.Add(new City("New York", "NY"));
            s_allCities.Add(new City("Philadelphia", "PA"));
            s_allCities.Add(new City("Phoenix", "AZ"));
        }

        /// <summary>
        /// Get all cities
        /// </summary>
        public static CityCollection AllCities
        {
            get { return s_allCities; }
        }
	}
}
